﻿// -------------------------------------------------------------------------
//    @FileName         :    NFSkillUtil.cpp
//    @Author           :    gaoyi
//    @Date             :    24-8-29
//    @Email            :    445267987@qq.com
//    @Module           :    NFSkillUtil
//
// -------------------------------------------------------------------------

#include "NFSkillUtil.h"

bool NFSkillUtil::IsActiveSkill(proto_ff::enSkillTalentType eType)
{
    return eType == proto_ff::ESKILL_TALENT_TYPE_ACTIVE
           || eType == proto_ff::ESKILL_TALENT_TYPE_AOYI
           || eType == proto_ff::ESKILL_TALENT_TYPE_BUFF;
}

bool NFSkillUtil::IsPassiveSkill(proto_ff::enSkillTalentType eType)
{
    return eType == proto_ff::ESKILL_TALENT_TYPE_TEXING
           || eType == proto_ff::ESKILL_TALENT_TYPE_PASSIVE;
}

bool NFSkillUtil::IsSkillMatchSlot(proto_ff::enSkillTalentType eType, proto_ff::enSkillSlotType eSlotType)
{
    if ((eType == proto_ff::ESKILL_TALENT_TYPE_ACTIVE && (eSlotType == proto_ff::EN_SKILL_SLOT_TYPE_NORMAL || eSlotType == proto_ff::EN_SKILL_SLOT_TYPE_EXPERIENCE))
        || (eType == proto_ff::ESKILL_TALENT_TYPE_AOYI && eSlotType == proto_ff::EN_SKILL_SLOT_TYPE_AOYI)
        || (eType == proto_ff::ESKILL_TALENT_TYPE_BUFF && eSlotType == proto_ff::EN_SKILL_SLOT_TYPE_BUFF))
    {
        return true;
    }

    return false;
}
